<template>
	<van-nav-bar
		title="发布文章"
		left-text="返回"
		right-text="发布"
		left-arrow
		@click-left="onClickLeft"
		@click-right="onClickRight"
	/>

	<WriteArticleRich @change="onChange">

	</WriteArticleRich>
	
	<van-cell 
		value="添加心情" 
		is-link to='/' 
		icon='fire-o'
	/>
	<van-cell value="文本朗读" icon='play-circle-o'>
		<template #right-icon>
			<van-switch v-model="checked" size="24" />
		</template>
	</van-cell>
</template>

<script>
	
	import WriteArticleRich from '@/components/WriteArticleRich.vue';

	export default {
		data() {
			return {
				message: '',
				checked: true,
				article_content: '',
			}
		},
		methods: {
			onClickLeft() {history.back()},
			onClickRight() {console.log(this.article_content)},
			onChange(text) {this.article_content = text}
		},
		components: {
			WriteArticleRich
		}
	};

</script>

<style>
</style>
